package chpt06;

import java.util.LinkedList;
import java.util.Queue;

public class QueueDemo01 {

	public static void main(String[] args) {
		Queue<StudentV1> queue = new LinkedList<>();
		queue.offer(new StudentV1("abx", 18));
		queue.offer(new StudentV1("abc", 20));
		queue.offer(new StudentV1("bax", 17));
//		System.out.println(queue.poll());
//		System.out.println(queue.poll());
//		System.out.println(queue.poll());
//		System.out.println(queue.poll());
		// System.out.println(queue.remove());
		while (!queue.isEmpty()) {
			System.out.println(queue.poll());
		}
	}
}
